﻿using Nemerle.Xml;
using System;
using System.Linq;
using System.Xml.Linq;

class EmbeddedXml
{
  public SparkLike() : void
  {
    def title = "Programming language authors";
    def authors = ["Anders Hejlsberg", "Simon Peyton-Jones"];
    
    def html = xml <#
      <html>
        <head>
          <title>$title</title>
        </head>
        <body>
          <ul $when(authors.Any())>
            <li $foreach(author in authors)>$author</li>
          </ul>
        </body>
      </html>
    #>;
    Console.WriteLine(html.GetType().Equals(typeof(XElement)));
  }
}
